{% extends "base.html" %}

{% block title %}创建分类 - 墨韵图书共享平台{% endblock %}

{% block content %}
<div class="admin-panel">
    <div class="row mb-4">
        <div class="col-md-12">
            <h2 class="ink-decoration mb-4">创建新分类</h2>
            <p class="text-muted">添加新的图书分类，用于组织图书。</p>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-3">
            <div class="card ink-card mb-4">
                <div class="card-header">
                    <h5 class="mb-0">管理菜单</h5>
                </div>
                <div class="list-group list-group-flush">
                    <a href="{{ url_for('admin_panel') }}" class="list-group-item list-group-item-action">
                        <i class="fas fa-tachometer-alt me-2"></i> 仪表盘
                    </a>
                    <a href="{{ url_for('admin_books') }}" class="list-group-item list-group-item-action">
                        <i class="fas fa-book me-2"></i> 图书管理
                    </a>
                    <a href="{{ url_for('admin_users') }}" class="list-group-item list-group-item-action">
                        <i class="fas fa-users me-2"></i> 用户管理
                    </a>
                    <a href="{{ url_for('admin_categories') }}" class="list-group-item list-group-item-action active">
                        <i class="fas fa-tags me-2"></i> 分类管理
                    </a>
                    <a href="{{ url_for('admin_statistics') }}" class="list-group-item list-group-item-action">
                        <i class="fas fa-chart-bar me-2"></i> 使用统计
                    </a>
                </div>
            </div>
        </div>
        
        <div class="col-md-9">
            <div class="card ink-card">
                <div class="card-header">
                    <h5 class="mb-0">新分类信息</h5>
                </div>
                <div class="card-body">
                    <form method="post">
                        <div class="mb-3">
                            <label for="name" class="form-label">分类名称</label>
                            <input type="text" class="form-control" id="name" name="name" required>
                            <div class="form-text">请输入一个简洁明了的分类名称</div>
                        </div>
                        
                        <div class="mb-3">
                            <label for="description" class="form-label">分类描述</label>
                            <textarea class="form-control" id="description" name="description" rows="3"></textarea>
                            <div class="form-text">简要描述此分类包含的图书类型</div>
                        </div>
                        
                        <div class="d-flex justify-content-between">
                            <a href="{{ url_for('admin_categories') }}" class="btn btn-secondary">
                                <i class="fas fa-arrow-left me-1"></i> 返回
                            </a>
                            <button type="submit" class="btn btn-primary">
                                <i class="fas fa-plus me-1"></i> 创建分类
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 